package login

import (
	"demo/api/common"
	"demo/internal/model/entity"
	"github.com/gogf/gf/v2/frame/g"
)

type LoginReq struct {
	g.Meta   `path:"/login" tags:"登录/退出" method:"post" summary:"登录"`
	Username string `p:"username" v:"required#登录账号不能为空"`
	Password string `p:"password" v:"required#密码不能为空"`
}

type LoginRes struct {
	g.Meta   `mime:"application/json"`
	UserInfo entity.Account `json:"userInfo"`
	Token    string         `json:"token"`
}

type LogoutReq struct {
	g.Meta `path:"/logout" tags:"登录/退出" method:"post" summary:"登出"`
	*common.Author
}

type LogoutRes struct {
	*common.EmptyRes
}
